package com.yzt.zhuju.manager;

import android.content.Context;
import android.content.res.AssetManager;
import android.graphics.Typeface;

/**
 * 功能：自定义文字的管理类
 */
public class FontManager {

    private Typeface niceAccountTypeFace;

    private static FontManager mInstance;

    private FontManager() {
    }

    public static FontManager getInstance() {
        if (mInstance == null) {
            mInstance = new FontManager();
        }
        return mInstance;
    }

    public void init(Context context) {
        //得到AssetManager
        AssetManager mgr = context.getAssets();
        niceAccountTypeFace = Typeface.createFromAsset(mgr, "fonts/COOPBL.TTF");
    }

    public Typeface getTypeface() {
        return niceAccountTypeFace;
    }
}
